package com.study.mall.mallproduct.controller;


import com.study.mall.mallproduct.entity.PmsCategoryBrandRelation;
import com.study.mall.mallproduct.service.PmsCategoryBrandRelationService;
import com.stydy.mallcommon.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 品牌分类关联 前端控制器
 * </p>
 *
 * @author admin
 * @since 2022-03-05
 */
@RestController
@RequestMapping("//pmsCategoryBrandRelation")
public class PmsCategoryBrandRelationController {

    @Autowired
    private PmsCategoryBrandRelationService brandRelationService;

    @PostMapping("/save")
    public R save(@RequestBody PmsCategoryBrandRelation pmsCategoryBrandRelation){
        this.brandRelationService.save(pmsCategoryBrandRelation);
        return R.ok();
    }
    @DeleteMapping("delete")
    public R delete(@RequestBody Long[] ids){
        this.brandRelationService.removeByBatch(ids);
        return R.ok();
    }
}

